<template>
  <el-container class="home_container">
    <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
      <el-menu :router="true">
        <el-submenu index="1">
          <template slot="title"><i class="el-icon-message"></i>导航一</template>
          <el-menu-item index="/article">文章列表</el-menu-item>
        </el-submenu>


      </el-menu>
    </el-aside>
    <el-container>
      <el-header class="header">
        <el-button class="out_login" type="primary" @click="logout()">
          退出
        </el-button>
      </el-header>
      <el-main>
        <router-view></router-view>
      </el-main>

    </el-container>


  </el-container>

</template>

<style>

.home_container {
  height: 100%;
}

.el-header {
  background-color: #2b4b6b;
  color: #cccccc;
}

.el-aside {
  background-color: #ccc;
  height: 100%;
}

.el-main {
  background-color: #fff;
}
.header{
  display: flex;
  justify-content: right;
  align-items: center;
}
.out_login {
  width: 80px;
  height: 80%;

}

</style>

<script>
export default {
  data() {

    return {}
  }, methods: {
    logout() {
      window.sessionStorage.clear()
      this.$router.push('/login')
      // console.log('aaa')
    }
  }
};
</script>